package com.movitech.mobile.cz.base.purchase.bizservice;

import com.baomidou.mybatisplus.plugins.Page;
import com.movitech.mobile.cz.base.modules.controller.RestReturnResult;
import com.movitech.mobile.cz.base.purchase.bizvo.*;
import com.movitech.mobile.cz.base.purchase.bizvo.purchase.NodeClickVo;
import com.movitech.mobile.cz.base.purchase.bizvo.purchase.TechnicaBidScoreReqVO;
import com.movitech.mobile.cz.base.purchase.bizvo.purchase.UpdateOperatorVO;
import com.movitech.mobile.cz.base.purchase.entity.*;
import com.movitech.mobile.cz.base.purchase.entity.ext.*;
import com.movitech.mobile.cz.base.purchase.entity.resultType.IdName;
import com.movitech.mobile.cz.base.supplier.bizvo.FlowTurnVO;
import com.movitech.mobile.cz.base.supplier.bizvo.PurchaseMbsCallBackVO;
import com.movitech.mobile.cz.base.supplier.entity.SMyDeals;

import java.io.InputStream;
import java.util.List;

public interface WorkFlowService {

	void generateFlowForm(PurchaseFlowFormBisReqVO vo);

	RestReturnResult savePurchasePlan(PurchasePlanRequestVO purchasePlanRequestVO);

	Page<ExtWFlowForm> findWorkFlowList(Page<ExtWFlowForm> page, WFowFormListReq vo);
	Page<ExtWFlowForm> findSimWorkFlowList(Page<ExtWFlowForm> page, WFowFormListReq vo);

	PurchasePlanNodeAllDataResVO selectPurchasePlanNodeData(String wflowFormId);

	AnswerQuestionResponseVO getQuestionAnswerNodeData(String formId);
	BackBidRspVO selectBackBidNodeData(String wflowFormId,Integer round);

	OpenBidRspVO selectOpenBidNodeData(String formId);

	void openBid(String formId);

	InquiringBidRspVO selectInquiringBidNodeData(String flowFormId);

	ConfirmBidNodeAllDataResVO selectConfirmBidNodeData(String wflowFormId);

	List<SAttachAllResVO> selectAllSAttach(String wflowFormId);

	void  submitPurchasePlan(PurchasePlanParam purchasePlanParam);

	void  changePurchasePlan(String wFlowFormId);

	void FlowTurnCommon(FlowTurnVO flowTurnVO);

	WFlowFormBidDelayHistory delayBid(DelayBidVO delayBidVO);

	List<WFlowFormBidDelayHistory> delayBidHistory(DelayBidVO delayBidVO);


	void updateCalibrationInfo(ExtWFlowFormBackBid flowFormBackBid);
	void updateBusinessInfo(ExtWFlowFormBackBid flowFormBackBid);

	void addInquiringBidAnswer(InquiringBidAnswerReqVO inquiringBidAnswerReqVO);
	void deleteInquiringBidAnswer(String id);
	void sendInquiringBidAnswer(String id);
	void initiatingTechnicalMarkScore(TechnicaBidScoreReqVO technicaBidScoreReqVO);
	void abandonedBid(SelectBidUnitReqVo selectBidUnitReqVo);
	List<ExtWFlowFormBackBid> selectAbandonedBidList(String formId);
	List<ExtWFlowFormBackBid> selectBidUnitList(String formId);
	void initiateBusinessNegotiations(BusinessBidReqVO businessBidReqVO);
	List<ExtWFlowFormDiscussionHistory> getOneThingAndOneDiscussionData(WFlowFormDiscussionHistory wFlowFormDiscussionHistory);

	void submitOneThingAndOneDiscussion(ExtWFlowFormDiscussionHistory wFlowFormDiscussionHistory);

	List<CalibrationInfoRspVO> addCalibrationInfo(CalibrationInfoReqVO calibrationInfoReqVO);
	void deleteCalibrationInfo(CalibrationInfoReqVO calibrationInfoReqVO);
	void selectBidUnit(SelectBidUnitReqVo selectBidUnitReqVo);

	InvitationDetailResponse invitationDetail(String dealId);


	void purchaseMbsCallBack(PurchaseMbsCallBackVO purchaseMbsCallBackVO);

	List<ExtWFlowFormStrategicProtocol> quoteStrategicProtocol(QuoteStrategicProtocolVO quoteStrategicProtocolVO);

	List<ExtWFlowFormCashDeposit> selectCashDeposit(String formId);

	void depositCashBack(String formId);

	RestReturnResult launchCalibrationApproval(CalibrationApprovalVO vo);
	void sendNoticeAndThank(String formid);

	void calibrationInterview(CalibrationInterviewVO vo);
	/**
	 * 答疑节点数据集合
	 */
	AnswerNodeRspVO findAnswerNodeData(String formId);


	/**
	 * 发起会签
	 */
	void qaCountSign(QaCountSignReqVO qaCountSignReqVO);
	/**
	 * 提交会签结果
	 */
	void submitCountSignResult(DealRequestVO dealRequestVO);
	/**
	 * 供应商入围
	 * @param myDealId
	 * @return
	 * @throws Exception
	 */
	public RestReturnResult lstSupplierEntry(String myDealId) throws Exception;

	/**
	 * 发起保证金
	 * @param flowFormId
	 * @return
	 * @throws Exception
	 */
	public RestReturnResult launchDepositConfirm(String flowFormId) throws Exception;

	/**
	 * 保证金确认
	 * @param depositConfirmRequestVO
	 * @return
	 */
	public RestReturnResult depositConfirm(DepositConfirmRequestVO depositConfirmRequestVO) throws Exception;

	/**
	 * 招标公告
	 * @param flowFormId
	 * @return
	 */
	public RestReturnResult biddingAnnouncement(String flowFormId) throws Exception;

	/**
	 * 发送招标公告
	 * @param biddingAnnouncementRequestVO
	 * @return
	 * @throws Exception
	 */
	public RestReturnResult sendBiddingAnnoucement(BiddingAnnouncementRequestVO biddingAnnouncementRequestVO);

	/**
	 * 招标文件
	 * @param flowFormId
	 * @return
	 */
	public RestReturnResult biddingDocument(String flowFormId) throws Exception;

	/**
	 * 招标文件操作
	 * @param biddingDocumentRequestVO
	 * @return
	 */
	public RestReturnResult biddingDocumentOperation(BiddingDocumentRequestVO biddingDocumentRequestVO);

	/**
	 * 发标详情
	 * @param flowFormId
	 * @return
	 */
	public RestReturnResult sendBiddingDetails(String flowFormId) throws Exception;

	/**
	 * 修改时间节点计划
	 * @param timeNodePlanVO
	 * @return
	 */
	public RestReturnResult updateTimeNodePlan(TimeNodePlanVO timeNodePlanVO);


	BidEvaluationConclusionRspVO getBidEvaluationConclusion(String flowFormId);

	BidWinningNoticeRspVO bidWinningNoticeList(String formId);

	BidEvaluationInterviewRspVO bidEvaluationInterviewData(String flowFormId);

	BidEvaluationInterviewRspVO initiateBusinessNegotiationsData(String flowFormId);

	void bidEvaluationInterviewSubmit(BidEvaluationInterviewReqVO vo);

	List<ExtWFlowFormBackBid> sendBidTwoData(String flowFormId);

	void sendBidTwoSubmit(SendBidTwoReqVO vo);

    void sendAskFile(String formId);

	boolean deleteById(String id);

    SMyDeals selectDeals(NodeClickVo vo);

	HeaderVO selectHeaderList(String formId);

    void sendQuestionFile(String id);

    /**
     * 发送内部通知
     * @param vo
     * @return
     */
	RestReturnResult sendIntraNotification(IntraNotificationRequestVO vo);

	//void sendBidSubmit(String formId);

	FlowBidRspVO flowBid(String formId);

	TechnicalMarkScoreRspVO technicalMarkScoreDetail(String formId);

	boolean technicalMarkScoreSubmit(TechnicalMarkScoreRspVO technicalMarkScoreRspVO);

    List<CalibrationInfoRspVO> selectCalibrationInterviewData(String formId);

    List<IdName> selectAddInquiringBidAnswerData(String formId);

	ExtWFlowFormBidCandidateUnit addBidCandidateUnit(BidCandidateUnitReqResVO bidCandidateUnitRequestVO);

	WFlowFormBidCandidateUnit deleteBidCandidateUnit(String  id);

    List<ExtWStrategicProtocol> getQuoteStrategicProtocolList(WStrategicProtocolReqVO wStrategicProtocolReqVO);

	void getQuoteStrategicProtocolPage(Page<ExtWStrategicProtocol> page,WStrategicProtocolReqVO wStrategicProtocolReqVO);

	void deleteQuoteStrategicProtocol(String id);

	RestReturnResult confirmDepositCallBack(List<ConfirmDepositCallBackReqVO> confirmDepositCallBackReqVOList);

	RestReturnResult drawBackDepositCallBack(List<DrawBackDepositCallBackReqVO> drawBackDepositCallBackReqVOList);

	/***
	 * MBS回调公共接口
	 * @param mbsCommonCallBackReqVOList
	 * @return
	 */
	RestReturnResult mbsCommonCallBack(List<MbsCommonCallBackReqVO> mbsCommonCallBackReqVOList);

    void updatePriceQuoteStrategicProtocol(String id, Double price);

    void updateOperator(UpdateOperatorVO updateOperatorVO);

    String uploadStrategicProtocol(InputStream in);

    void updateStrategicProtocol(WStrategicProtocol wStrategicProtocol);

    void saveCalibrationConclusion(CalibrationInfoReqVO calibrationInfoReqVO);

    void associateContract(AssociateContractVO form);

    void releaseContract(AssociateContractVO form);

	void deleteContract(AssociateContractVO form);
}
